package cn.iocoder.yudao.module.carbon.api.gas;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.carbon.api.gas.dto.GasRespDTO;
import cn.iocoder.yudao.module.carbon.enums.ApiConstants;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Collection;
import java.util.List;
import java.util.Map;

@FeignClient(name = ApiConstants.NAME)
@Tag(name =  "RPC 服务 - 温室气体")
public interface GasApi {

    String PREFIX = ApiConstants.PREFIX + "/gas";

    @GetMapping(PREFIX + "/list")
    @Operation(summary = "获取温室气体列表")
    CommonResult<List<GasRespDTO>> getGasList();

    @PostMapping(PREFIX + "/list-ids")
    @Operation(summary = "使用ids,获取温室气体列表")
    CommonResult<Map<Long, GasRespDTO>> getGasMap(@RequestBody Collection<Long> ids);

}
